package com.b2bpsssm.controller.material.customer;


import com.b2bpsssm.common.R;
import com.b2bpsssm.pojo.CustomerClassification;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@Api(value = "客户分类页面",tags = "客户分类接口Api")
public class CustomerClassificationController {
    /*
     * 客户分类父类查询
     * */
    @RequestMapping(value = "/customer/queryCustomerClassificationByPageLimit",method = RequestMethod.GET)
    @ApiOperation(value = "查询客户分类",notes = "按页码显示客户分类",httpMethod = "get",response = R.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "page",value = "当前页码",required = true),
            @ApiImplicitParam(name = "limit",value = "每页条数",required = true)
    })
    @ResponseBody
    public R queryCustomerClassificationByPageLimit(){
        R r = new R();
        r.setCode(200);
        r.setData(666);
        r.setMassage("success");
        return r;
    }

    

    /*
     * 新增分类
     * */
    @RequestMapping(value = "/customer/addCustomerClassification",method = RequestMethod.POST)
    @ApiOperation(value = "新增客户分类",notes = "新增并保存",httpMethod = "post",response = R.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "cus_Cla_Create_Date",value = "创建时间",required = true),
            @ApiImplicitParam(name = "cus_Cla_Name",value = "分类名称",required = true),
            @ApiImplicitParam(name = "cus_Cla_Status",value = "状态",required = true),
    })
    @ResponseBody
    public R addCustomerClassification(CustomerClassification CustomerClassification){
        R r = new R();
        r.setCode(200);
        r.setData(666);
        r.setMassage("success");
        return r;
    }

    /*
     * 删除客户分类
     * */
    @RequestMapping(value = "/customer/delCustomerClassification",method = RequestMethod.POST)
    @ApiOperation(value = "删除客户分类",notes = "删除",httpMethod = "post",response = R.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "cus_Cla_Id",value = "主键ID关联客户",required = true),
    })
    @ResponseBody
    public R delCustomerClassification(String comClaName){
        R r = new R();
        r.setCode(200);
        r.setData(666);
        r.setMassage("success");
        return r;
    }

    /*
     * 修改分类
     * */
    @RequestMapping(value = "/customer/updateCustomerClassification",method = RequestMethod.POST)
    @ApiOperation(value = "修改客户分类",notes = "保存",httpMethod = "post",response = R.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "cus_Cla_Create_Date",value = "创建时间",required = true),
            @ApiImplicitParam(name = "cus_Cla_Name",value = "分类名称",required = true),
            @ApiImplicitParam(name = "cus_Cla_Status",value = "状态",required = true),
            @ApiImplicitParam(name = "cus_Cla_Id",value = "主键ID关联客户",required = true),
    })
    @ResponseBody
    public R updateCustomerClassification(CustomerClassification CustomerClassification){
        R r = new R();
        r.setCode(200);
        r.setData(666);
        r.setMassage("success");
        return r;
    }
}
